﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Profile.aspx.vb" Inherits="APhones2.Profile" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <p>
        <br />
        <asp:FormView ID="FormView1" runat="server" DataKeyNames="ID" 
            DataSourceID="SqlDataSource1">
            <EditItemTemplate>
                ID:
                <asp:Label ID="IDLabel1" runat="server" Text='<%# Eval("ID") %>' />
                <br />
                UserName: <br />
                SurName:
                <asp:TextBox ID="SurNameTextBox" runat="server" Text='<%# Bind("SurName") %>' />
                <br />
                OtherName:
                <asp:TextBox ID="OtherNameTextBox" runat="server" 
                    Text='<%# Bind("OtherName") %>' />
                <br />
                Gender:
                <br />
                Status:
                <asp:TextBox ID="LocationTextBox0" runat="server" 
                    Text='<%# Bind("Location") %>' />
                <br />
                Birthday: <br />
                PreviousPhone: <br />
                Country: <br />
                Location:
                <asp:TextBox ID="LocationTextBox" runat="server" 
                    Text='<%# Bind("Location") %>' />
                <br />
                Email: <br />
                Picture: <br />
                <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
                    CommandName="Update" Text="Update" />
&nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" 
                    CommandName="Cancel" Text="Cancel" />
            </EditItemTemplate>
            <InsertItemTemplate>
                UserName:
                <asp:TextBox ID="UserNameTextBox" runat="server" 
                    Text='<%# Bind("UserName") %>' />
                <br />
                SurName:
                <asp:TextBox ID="SurNameTextBox" runat="server" Text='<%# Bind("SurName") %>' />
                <br />
                OtherName:
                <asp:TextBox ID="OtherNameTextBox" runat="server" 
                    Text='<%# Bind("OtherName") %>' />
                <br />
                Gender:
                <asp:TextBox ID="GenderTextBox" runat="server" Text='<%# Bind("Gender") %>' />
                <br />
                Status:
                <asp:TextBox ID="StatusTextBox" runat="server" Text='<%# Bind("Status") %>' />
                <br />
                Birthday:
                <asp:TextBox ID="BirthdayTextBox" runat="server" 
                    Text='<%# Bind("Birthday") %>' />
                <br />
                PreviousPhone:
                <asp:TextBox ID="PreviousPhoneTextBox" runat="server" 
                    Text='<%# Bind("PreviousPhone") %>' />
                <br />
                Country:
                <asp:TextBox ID="CountryTextBox" runat="server" Text='<%# Bind("Country") %>' />
                <br />
                Location:
                <asp:TextBox ID="LocationTextBox" runat="server" 
                    Text='<%# Bind("Location") %>' />
                <br />
                Email:
                <asp:TextBox ID="EmailTextBox" runat="server" Text='<%# Bind("Email") %>' />
                <br />
                Picture:
                <asp:TextBox ID="PictureTextBox" runat="server" Text='<%# Bind("Picture") %>' />
                <br />
                <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
                    CommandName="Insert" Text="Insert" />
                &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" 
                    CausesValidation="False" CommandName="Cancel" Text="Cancel" />
            </InsertItemTemplate>
            <ItemTemplate>
                <br />
                SurName:
                <asp:Label ID="SurNameLabel" runat="server" Text='<%# Bind("SurName") %>' />
                <br />
                OtherName:
                <asp:Label ID="OtherNameLabel" runat="server" Text='<%# Bind("OtherName") %>' />
                <br />
                Gender:
                <asp:Label ID="GenderLabel" runat="server" Text='<%# Bind("Gender") %>' />
                <br />
                <td align="center" rowspan="6">
                <img src='<%# Eval("Picture") %>' height="200" width="200" style="width: 323px; margin-left: 13px" />
                
                <br />

            </ItemTemplate>
        </asp:FormView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:Phones %>" 
            ProviderName="<%$ ConnectionStrings:Phones.ProviderName %>" 
            SelectCommand="SELECT [ID], [UserName], [SurName], [OtherName], [Gender], [Status], [PreviousPhone], [Birthday], [Country], [Location], [Email], [Picture] FROM [Profile] WHERE ([UserName] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="UserName" QueryStringField="UserName" 
                    Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        <asp:Button ID="bn_EditProfile1" runat="server" Text="Edit Profile" />
    </p>
   

</asp:Content>
